import dayjs from "dayjs"


export const sleep = (ms: number) => {
  return new Promise(resolve => setTimeout(resolve, ms))
}

export const dateRender = (value: string) => {
  if (!value) {
    return ""
  }
  return dayjs(value).format('YYYY年MM月DD日')
}

export const localDateRender = (date: string) => {
  if (!date) {
    return
  }
  return new Date(date).toLocaleString()
}
